#Requires AutoHotkey v2.0

A_TrayMenu.Add()  ; 创建分隔线.
A_TrayMenu.Add("Item1", MenuHandler)  ; 创建新菜单项.
Persistent

MenuHandler(ItemName, ItemPos, MyMenu) {
    MsgBox "You selected " ItemName " (position " ItemPos ")"
}